/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0e6d2;
    color: #333;
    line-height: 1.6;
}

/* 游戏容器 */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 游戏头部 */
.game-header {
    background-color: #8b4513;
    color: #f0e6d2;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-header h1 {
    font-size: 28px;
    font-weight: bold;
}

.game-time {
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
}

/* 游戏导航 */
.game-nav {
    background-color: #a0522d;
    padding: 10px;
}

.game-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.game-nav a {
    color: #f0e6d2;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.game-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 游戏内容区 */
.game-content {
    background-color: #fff8e7;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    min-height: 500px;
}

/* 面板样式 */
.panel {
    animation: fadeIn 0.5s ease-in;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 烹饪系统样式 */
.cooking-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.recipes-section,
.materials-section {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.recipe-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.recipe-item h4 {
    margin-top: 0;
    color: #333;
}

.recipe-effects,
.recipe-ingredients {
    font-size: 14px;
    margin: 8px 0;
    color: #666;
}

.recipe-item button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.recipe-item button:hover:not(:disabled) {
    background-color: #45a049;
}

.recipe-item button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.material-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: white;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.material-item button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.material-item button:hover {
    background-color: #0b7dda;
}

.panel h2 {
    color: #8b4513;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #cd853f;
}

.panel h3 {
    color: #a0522d;
    margin: 20px 0 10px 0;
}

/* 角色信息样式 */
.player-stats,
.attributes,
.city-info,
.farm-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat,
.attribute,
.info-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat label,
.attribute label,
.info-item label {
    font-weight: bold;
    color: #666;
}

.stat span,
.attribute span,
.info-item span {
    color: #8b4513;
    margin-left: 5px;
}

/* 建筑和种植相关样式 */
#buildingsList,
#farmStatus,
#inventoryList,
#skillsList {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    min-height: 100px;
}

.build-menu,
.crop-selection {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    gap: 10px;
    align-items: center;
}

select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

button {
    padding: 8px 20px;
    background-color: #8b4513;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #6b3311;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 游戏底部 */
.game-footer {
    margin-top: 20px;
    text-align: center;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.game-controls button {
    font-size: 16px;
    padding: 10px 25px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-nav ul {
        flex-wrap: wrap;
    }
    
    .player-stats,
    .attributes,
    .city-info,
    .farm-info {
        grid-template-columns: 1fr;
    }
    
    .build-menu,
    .crop-selection {
        flex-direction: column;
    }
    
    .game-controls {
        flex-direction: column;
    }
}